const popStay = {
    state: {
        popStayParams: {
            name: '',
            posX: 0,
            posY: 0,
            remarks: null
        }
    },
    mutations: {
        POPSTAYPARAMS: (state, popStayParams) => {
            state.popStayParams = popStayParams
        },
        CLOSESTAYPOP: (state) => {
            state.popStayParams.name = ''
            state.popStayParams.posX = 0
            state.popStayParams.posY = 0
            state.popStayParams.remarks = null
        }
    },
    actions: {

        popStayParams: ({ commit }, popStayParams) => {
            commit('POPSTAYPARAMS', popStayParams)
        },
        closePopStay: ({ commit }) => {
            commit('CLOSESTAYPOP')
        }
    }
}

export default popStay
